#pragma once
#include <unordered_map>
#include "FileProxy.h"
#include "Hash.h"

namespace ja2{ namespace vfs
{
	class File;

	//! Virtual location.
	class VirtualLocation : boost::noncopyable
	{
		// Typedefs
	private:
		typedef std::unordered_map<boost::filesystem::path, FileProxy, hash_path> FileMap_t;

		// Attributes
	private:
		//! Path associated for location.
		boost::filesystem::path const m_Path;
		//! Exclusive???.
		bool const m_Exclusive;
		//! Map of files.
		FileMap_t m_FileMap;
				
		// Operations
	public:
		//! File exist in current location.
		bool file_exist(boost::filesystem::path const &File) const;
		//! Get file from current location.
		FileProxy get_file(boost::filesystem::path const &FileName) const;
		//! Add file proxy.
		void add_file(FileProxy const &File);

		// Operators
	private:
		void operator=(vfs::VirtualLocation const& vloc);

		// Construction/Destruction
	public:
		VirtualLocation(boost::filesystem::path const &Path, bool IsExclusive);
	};
} /*vfs*/} /*ja2*/
